package cn.net.msg.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.stereotype.Component;

@Component("user")
@Entity
@Table(name = "tb_user")
public class TbUser{

    @Id @Column(name = "User_id",length=20)
    private long userId;
    @Column(name= "User_point",length=11)
    private int userPoint;
    @Column(name= "User_name",length=100)
    private String userName;
    @Column(name= "User_email",length=100,nullable=true)
    private String userEmail;
    @Column(name= "User_password",length=50,nullable=true)
    private String userPassword;
    @Column(name= "User_sex",length=20)
    private String userSex;
    @Column(name= "Province_id",length=20)
    private int userProvinceId;
    @Column(name= "City_id",length=20,columnDefinition="INT(11) default '-1'")
    private int userCityId;
    @Column(name= "Grade_id",length=11,columnDefinition="INT(11) default '-1'")
    private int gradeId;
    @Column(name= "User_summary",length=500)
    private String userSummary;
    @Column(name= "User_birthday")
    @Temporal(TemporalType.DATE)
    private Date userBirthday;
    @Column(name= "User_qq",length=50)
    private String userQQ;
    @Column(name= "User_regtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date userRegtime;
    @Column(name= "User_edittime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date userEdittime;
    @Column(name= "User_logintime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date userLogintime;	
    @Column(name = "Udf1",length=100,nullable=true)
    private String udf1;
    @Column(name = "Udf2",length=100,nullable=true)
    private String udf2;
    @Column(name = "Udf3",length=100,nullable=true)
    private String udf3;
    @Column(name = "TaskType",length=10,nullable=true)
    private int taskType;

    public TbUser(){

    }

    public TbUser(String userName){
        this.userName = userName;
    } 

    
    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        this.userId = userId;
    }

    
    public int getUserPoint() {
        return userPoint;
    }

    public void setUserPoint(int userPoint) {
        this.userPoint = userPoint;
    }

    
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }

    
    public String getUserEmail() {
        return userEmail;
    }
    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    
    public String getUserPassword() {
        return userPassword;
    }
    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    
    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    
    public int getUserProvinceId() {
        return userProvinceId;
    }

    public void setUserProvinceId(int userProvinceId) {
        this.userProvinceId = userProvinceId;
    }

    
    public int getUserCityId() {
        return userCityId;
    }

    public void setUserCityId(int userCityId) {
        this.userCityId = userCityId;
    }

    
    public int getGradeId() {
        return gradeId;
    }

    public void setGradeId(int gradeId) {
        this.gradeId = gradeId;
    }

    
    public String getUserSummary() {
        return userSummary;
    }

    public void setUserSummary(String userSummary) {
        this.userSummary = userSummary;
    }

    
    public Date getUserBirthday() {
        return userBirthday;
    }

    public void setUserBirthday(Date userBirthday) {
        this.userBirthday = userBirthday;
    }

    
    public String getUserQQ() {
        return userQQ;
    }

    public void setUserQQ(String userQQ) {
        this.userQQ = userQQ;
    }

    @Column(name= "User_regtime")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getUserRegtime() {
        return userRegtime;
    }
    public void setUserRegtime(Date userRegtime) {
        this.userRegtime = userRegtime;
    }

    
    public Date getUserEdittime() {
        return userEdittime;
    }
    public void setUserEdittime(Date userEdittime) {
        this.userEdittime = userEdittime;
    }

    
    public Date getUserLogintime() {
        return userLogintime;
    }
    public void setUserLogintime(Date userLogintime) {
        this.userLogintime = userLogintime;
    }

    
    public String getUdf1() {
        return udf1;
    }
    public void setUdf1(String udf1) {
        this.udf1 = udf1;
    }

    
    public String getUdf2() {
        return udf2;
    }
    public void setUdf2(String udf2) {
        this.udf2 = udf2;
    }

    
    public String getUdf3() {
        return udf3;
    }
    public void setUdf3(String udf3) {
        this.udf3 = udf3;
    }

    
    public int getTaskType() {
        return taskType;
    }
    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }

}
